package com.lin.cms.domain;

import java.io.Serializable;

public class ContentTopic implements Serializable {

	private static final long serialVersionUID = 1L;

	private int contentId;

	private int topicId;

	public ContentTopic() {
	}

	public int getContentId() {
		return contentId;
	}

	public void setContentId(int contentId) {
		this.contentId = contentId;
	}

	public int getTopicId() {
		return topicId;
	}

	public void setTopicId(int topicId) {
		this.topicId = topicId;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + contentId;
		result = prime * result + topicId;

		return result;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final ContentTopic other = (ContentTopic) obj;
		if (contentId != other.contentId)
			return false;
		if (topicId != other.topicId)
			return false;

		return true;
	}
	
	@Override
	public String toString() {
		return getClass().getName() + "@" + Integer.toHexString(hashCode()) + 
			"(" + 
			"contentId=" + "'" + contentId + "'" + ", " + 
			"topicId=" + "'" + topicId + "'" + 
			")";
	}
	
}
